package com.leetcode.partition18;

import java.io.*;

/**
 * @author `RKC`
 * @date 2022/2/6 13:29
 */
public class LC1748唯一元素的和 {

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        String[] ss = reader.readLine().split(" ");
        int[] nums = new int[ss.length];
        for (int i = 0; i < ss.length; i++) nums[i] = Integer.parseInt(ss[i]);
        writer.write(sumOfUnique(nums) + "\n");
        writer.flush();
    }

    public static int sumOfUnique(int[] nums) {
        int[] cnt = new int[110];
        int ans = 0;
        for (int i = 0; i < nums.length; i++) {
            if (cnt[nums[i]] == 0) ans += nums[i];
            else if (cnt[nums[i]] == 1) ans -= nums[i];
            cnt[nums[i]]++;
        }
        return ans;
    }
}
